package container;
import java.util.ArrayList;


public class Stare implements Clonable {
	
	protected int x;
	protected int y;
	protected ArrayList<Stare> listaStari;
	protected Actiune parent;
	
	private static Stare st;
	
	public Stare() {
		x = 0;
		y = 0;
		listaStari = new ArrayList<Stare>();
		parent = null;
	}
	
	public Stare(int x,int y) {
		this.x = x;
		this.y = y;
		listaStari = new ArrayList<Stare>();
		parent = null;
	}
	
	public Object clone() {
		return this;
	}
	
	public int getX() {
		return x;
	}
	
	public void setX(int n) {
		x = n;
	}
	
	public int getY() {
		return y;
	}
	
	public void setY(int n) {
		y = n;
	}
	
	public void setParent(Actiune s) {
		parent = s;
	}
	
	public Actiune getParent() {
		return parent;
	}
	
	public void setListaStari(ArrayList<Stare> ls) {
		listaStari = ls;
	}
	
	public ArrayList<Stare> getListaStari() {
		return listaStari;
	}
	
	public void printStare() {
		System.out.println("Starea curenta: (" + this.x + " " + this.y + ") cu parintele (" +
				            this.parent.getStare().getX() + " " +  this.parent.getStare().getY() + ")");
	}
	
	public static void setStareStatic(Stare s) {
		st = s;
	}
	
	public static Stare getStareStatic() {
		return st;
	}
	
	public static void printStareStatic() {
		System.out.println("Starea curenta: (" + Stare.st.x + " " + Stare.st.y + ")");
	}
}
